package com.atguigu.gmall.product.controller;


import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.product.cron.SkuIdBloomTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2024/9/18 6:06
 */
@RestController
@RequestMapping("/admin/product")
public class RebuildBloomController {
    @Autowired
    SkuIdBloomTask skuIdBloomTask;
    @GetMapping("/rebuild")
    public Result rebuild(){
        skuIdBloomTask.rebuildBloom();
        return Result.ok();
    }
}
